package com.central.task.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.central.common.entity.TaskContent;
import com.central.common.entity.TaskParams;
import com.central.common.enums.TaskType;
import com.central.common.handler.TaskContentToStringHandler;
import com.central.common.handler.TaskParamsToStringHandler;
import com.central.common.model.SuperEntity;
import lombok.Getter;
import lombok.Setter;
import org.apache.ibatis.type.JdbcType;

import static com.baomidou.mybatisplus.annotation.FieldStrategy.NOT_NULL;

/**
 * @author Tindy
 * @date 2021/11/29
 * @describe
 */
@Setter
@Getter
@TableName(value = "task_defined_log",autoResultMap = true)
public class TaskDefinedLog extends SuperEntity {
    private int version;
    private String versionDesc;
    private Long taskDefinedId;
    private TaskType taskType;
    @TableField(jdbcType = JdbcType.VARCHAR, insertStrategy = NOT_NULL, typeHandler = TaskContentToStringHandler.class)
    private TaskContent taskContent;
    @TableField(jdbcType = JdbcType.VARCHAR, insertStrategy = NOT_NULL, typeHandler = TaskParamsToStringHandler.class)
    private TaskParams taskParams;
    @TableField(exist = false)
    private Boolean releaseState;
}
